-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rutracker direct proxies patch #60
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 125
💛 - Coveralls |
Thank you. Before we proceed, can you elaborate on why do you want to apply proxies exclusively to rutracker, but not for others, what's the usecase? |
Just because I use only RuTracker :) |
# Drop globally set tunnels settings. See toolbox.tunnel(). | ||
r_kwargs['proxies'] = {'http': None, 'https': None} | ||
# For using proxy exactly in a specific request | ||
if not proxies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make the flow not inverted:
if proxies:
...
elif not self.tunnel:
...
@@ -82,6 +83,7 @@ def request( | |||
:param allow_redirects: | |||
:param cookies: | |||
:param headers: Additional headers | |||
:param proxies: Proxies to specific request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why do you use to
preposition here and in similar cases above. Shouldn't It be for a
instead?
Ok, let's introduce it. You'd need to ensure CLI configuration of rutracker won't fail, though. |
Added proxy parameters into several RuTrackerTracker (and deeper) methods.
It might be useful in the case of proxy usage exactly in a specific RuTracker requests.
Tunnel functionality is not affected (can be used both simultaneously).